public class SortedOutcomeSpace extends OutcomeSpace
allBids, utilitySpace| Constructor and Description |
|---|
SortedOutcomeSpace(UtilitySpace utilSpace)
Instantiates a SortedOutcomeSpace: an enumeration of all possible bids in the domain
which can be efficiently searched using the provided methods.
|
| Modifier and Type | Method and Description |
|---|---|
BidDetails |
getBidNearUtility(double utility)
Gets a BidDetails which is close to the utility
|
java.util.List<BidDetails> |
getBidsinRange(Range r)
gets a list of BidDetails that have a utility within the range
|
int |
getIndexOfBidNearUtility(double utility)
Gets a BidDetails which is close to the utility
|
BidDetails |
getMaxBidPossible() |
BidDetails |
getMinBidPossible() |
int |
searchIndexWith(double value)
Binary search of a BidDetails with a particular value
if there is no BidDetails with the exact value gives the last index because this is the closest BidDetails to the value
|
generateAllBids, getAllOutcomespublic SortedOutcomeSpace(UtilitySpace utilSpace)
utilSpace - utilityspace of the agent.public java.util.List<BidDetails> getBidsinRange(Range r)
getBidsinRange in class OutcomeSpacer - public BidDetails getBidNearUtility(double utility)
getBidNearUtility in class OutcomeSpaceutility - public int getIndexOfBidNearUtility(double utility)
getIndexOfBidNearUtility in class OutcomeSpaceutility - public int searchIndexWith(double value)
value - public BidDetails getMaxBidPossible()
getMaxBidPossible in class OutcomeSpacepublic BidDetails getMinBidPossible()
getMinBidPossible in class OutcomeSpace